package cake.util;

import java.io.File;

public class FileUtil {
	public static boolean deleteFile(String name)
	{
		File file=new File(name);
		
		if(file.exists())
		{
			return file.delete();
		}
		
		return false;
	}
	/**
	 * 
	 * @param oldName
	 * @param newName
	 * @return
	 */
	public static boolean moveFile(String oldName,String newName)
	{
		File oldFile=new File(oldName);
		
		if(!oldFile.exists())
		{
			return false;
		}
		File newFile=new File(newName);
		
		return oldFile.renameTo(newFile);
	}
}
